{"ast":null,"code":"import _defineProperty from \"/Users/poppie/Desktop/development/messenger/app/frontend/node_modules/@babel/runtime/helpers/esm/defineProperty.js\";\nimport _slicedToArray from \"/Users/poppie/Desktop/development/messenger/app/frontend/node_modules/@babel/runtime/helpers/esm/slicedToArray.js\";\nvar __rest = this && this.__rest || function (s, e) {\n  var t = {};\n  for (var p in s) {\n    if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n  }\n  if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n    if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n  }\n  return t;\n};\nimport classNames from 'classnames';\nimport CSSMotion from 'rc-motion';\nimport * as React from 'react';\nimport { useMemo, useRef } from 'react';\nimport { ConfigContext } from '../config-provider';\nimport { cloneElement } from '../_util/reactNode';\nimport Ribbon from './Ribbon';\nimport ScrollNumber from './ScrollNumber';\nimport useStyle from './style';\nimport { isPresetColor } from './utils';\nvar Badge = function Badge(_a) {\n  var _classNames, _classNames2;\n  var customizePrefixCls = _a.prefixCls,\n    customizeScrollNumberPrefixCls = _a.scrollNumberPrefixCls,\n    children = _a.children,\n    status = _a.status,\n    text = _a.text,\n    color = _a.color,\n    _a$count = _a.count,\n    count = _a$count === void 0 ? null : _a$count,\n    _a$overflowCount = _a.overflowCount,\n    overflowCount = _a$overflowCount === void 0 ? 99 : _a$overflowCount,\n    _a$dot = _a.dot,\n    dot = _a$dot === void 0 ? false : _a$dot,\n    _a$size = _a.size,\n    size = _a$size === void 0 ? 'default' : _a$size,\n    title = _a.title,\n    offset = _a.offset,\n    style = _a.style,\n    className = _a.className,\n    _a$showZero = _a.showZero,\n    showZero = _a$showZero === void 0 ? false : _a$showZero,\n    restProps = __rest(_a, [\"prefixCls\", \"scrollNumberPrefixCls\", \"children\", \"status\", \"text\", \"color\", \"count\", \"overflowCount\", \"dot\", \"size\", \"title\", \"offset\", \"style\", \"className\", \"showZero\"]);\n  var _React$useContext = React.useContext(ConfigContext),\n    getPrefixCls = _React$useContext.getPrefixCls,\n    direction = _React$useContext.direction;\n  var prefixCls = getPrefixCls('badge', customizePrefixCls);\n  // Style\n  var _useStyle = useStyle(prefixCls),\n    _useStyle2 = _slicedToArray(_useStyle, 2),\n    wrapSSR = _useStyle2[0],\n    hashId = _useStyle2[1];\n  // ================================ Misc ================================\n  var numberedDisplayCount = count > overflowCount ? \"\".concat(overflowCount, \"+\") : count;\n  var isZero = numberedDisplayCount === '0' || numberedDisplayCount === 0;\n  var ignoreCount = count === null || isZero && !showZero;\n  var hasStatus = (status !== null && status !== undefined || color !== null && color !== undefined) && ignoreCount;\n  var showAsDot = dot && !isZero;\n  var mergedCount = showAsDot ? '' : numberedDisplayCount;\n  var isHidden = useMemo(function () {\n    var isEmpty = mergedCount === null || mergedCount === undefined || mergedCount === '';\n    return (isEmpty || isZero && !showZero) && !showAsDot;\n  }, [mergedCount, isZero, showZero, showAsDot]);\n  // Count should be cache in case hidden change it\n  var countRef = useRef(count);\n  if (!isHidden) {\n    countRef.current = count;\n  }\n  var livingCount = countRef.current;\n  // We need cache count since remove motion should not change count display\n  var displayCountRef = useRef(mergedCount);\n  if (!isHidden) {\n    displayCountRef.current = mergedCount;\n  }\n  var displayCount = displayCountRef.current;\n  // We will cache the dot status to avoid shaking on leaved motion\n  var isDotRef = useRef(showAsDot);\n  if (!isHidden) {\n    isDotRef.current = showAsDot;\n  }\n  // =============================== Styles ===============================\n  var mergedStyle = useMemo(function () {\n    if (!offset) {\n      return Object.assign({}, style);\n    }\n    var offsetStyle = {\n      marginTop: offset[1]\n    };\n    if (direction === 'rtl') {\n      offsetStyle.left = parseInt(offset[0], 10);\n    } else {\n      offsetStyle.right = -parseInt(offset[0], 10);\n    }\n    return Object.assign(Object.assign({}, offsetStyle), style);\n  }, [direction, offset, style]);\n  // =============================== Render ===============================\n  // >>> Title\n  var titleNode = title !== null && title !== void 0 ? title : typeof livingCount === 'string' || typeof livingCount === 'number' ? livingCount : undefined;\n  // >>> Status Text\n  var statusTextNode = isHidden || !text ? null : /*#__PURE__*/React.createElement(\"span\", {\n    className: \"\".concat(prefixCls, \"-status-text\")\n  }, text);\n  // >>> Display Component\n  var displayNode = !livingCount || typeof livingCount !== 'object' ? undefined : cloneElement(livingCount, function (oriProps) {\n    return {\n      style: Object.assign(Object.assign({}, mergedStyle), oriProps.style)\n    };\n  });\n  // Shared styles\n  var statusCls = classNames((_classNames = {}, _defineProperty(_classNames, \"\".concat(prefixCls, \"-status-dot\"), hasStatus), _defineProperty(_classNames, \"\".concat(prefixCls, \"-status-\").concat(status), !!status), _defineProperty(_classNames, \"\".concat(prefixCls, \"-status-\").concat(color), isPresetColor(color)), _classNames));\n  var statusStyle = {};\n  if (color && !isPresetColor(color)) {\n    statusStyle.color = color;\n    statusStyle.background = color;\n  }\n  var badgeClassName = classNames(prefixCls, (_classNames2 = {}, _defineProperty(_classNames2, \"\".concat(prefixCls, \"-status\"), hasStatus), _defineProperty(_classNames2, \"\".concat(prefixCls, \"-not-a-wrapper\"), !children), _defineProperty(_classNames2, \"\".concat(prefixCls, \"-rtl\"), direction === 'rtl'), _classNames2), className);\n  // <Badge status=\"success\" />\n  if (!children && hasStatus) {\n    var statusTextColor = mergedStyle.color;\n    return wrapSSR( /*#__PURE__*/React.createElement(\"span\", Object.assign({}, restProps, {\n      className: classNames(badgeClassName, hashId),\n      style: mergedStyle\n    }), /*#__PURE__*/React.createElement(\"span\", {\n      className: statusCls,\n      style: statusStyle\n    }), text && /*#__PURE__*/React.createElement(\"span\", {\n      style: {\n        color: statusTextColor\n      },\n      className: \"\".concat(prefixCls, \"-status-text\")\n    }, text)));\n  }\n  // <Badge status=\"success\" count={<Icon type=\"xxx\" />}></Badge>\n  return wrapSSR( /*#__PURE__*/React.createElement(\"span\", Object.assign({}, restProps, {\n    className: classNames(badgeClassName, hashId)\n  }), children, /*#__PURE__*/React.createElement(CSSMotion, {\n    visible: !isHidden,\n    motionName: \"\".concat(prefixCls, \"-zoom\"),\n    motionAppear: false,\n    motionDeadline: 1000\n  }, function (_ref) {\n    var _classNames3;\n    var motionClassName = _ref.className;\n    var scrollNumberPrefixCls = getPrefixCls('scroll-number', customizeScrollNumberPrefixCls);\n    var isDot = isDotRef.current;\n    var scrollNumberCls = classNames((_classNames3 = {}, _defineProperty(_classNames3, \"\".concat(prefixCls, \"-dot\"), isDot), _defineProperty(_classNames3, \"\".concat(prefixCls, \"-count\"), !isDot), _defineProperty(_classNames3, \"\".concat(prefixCls, \"-count-sm\"), size === 'small'), _defineProperty(_classNames3, \"\".concat(prefixCls, \"-multiple-words\"), !isDot && displayCount && displayCount.toString().length > 1), _defineProperty(_classNames3, \"\".concat(prefixCls, \"-status-\").concat(status), !!status), _defineProperty(_classNames3, \"\".concat(prefixCls, \"-status-\").concat(color), isPresetColor(color)), _classNames3));\n    var scrollNumberStyle = Object.assign({}, mergedStyle);\n    if (color && !isPresetColor(color)) {\n      scrollNumberStyle = scrollNumberStyle || {};\n      scrollNumberStyle.background = color;\n    }\n    return /*#__PURE__*/React.createElement(ScrollNumber, {\n      prefixCls: scrollNumberPrefixCls,\n      show: !isHidden,\n      motionClassName: motionClassName,\n      className: scrollNumberCls,\n      count: displayCount,\n      title: titleNode,\n      style: scrollNumberStyle,\n      key: \"scrollNumber\"\n    }, displayNode);\n  }), statusTextNode));\n};\nBadge.Ribbon = Ribbon;\nexport default Badge;","map":{"version":3,"names":["__rest","s","e","t","p","Object","prototype","hasOwnProperty","call","indexOf","getOwnPropertySymbols","i","length","propertyIsEnumerable","classNames","CSSMotion","React","useMemo","useRef","ConfigContext","cloneElement","Ribbon","ScrollNumber","useStyle","isPresetColor","Badge","_a","customizePrefixCls","prefixCls","customizeScrollNumberPrefixCls","scrollNumberPrefixCls","children","status","text","color","count","overflowCount","dot","size","title","offset","style","className","showZero","restProps","useContext","getPrefixCls","direction","wrapSSR","hashId","numberedDisplayCount","isZero","ignoreCount","hasStatus","undefined","showAsDot","mergedCount","isHidden","isEmpty","countRef","current","livingCount","displayCountRef","displayCount","isDotRef","mergedStyle","assign","offsetStyle","marginTop","left","parseInt","right","titleNode","statusTextNode","createElement","displayNode","oriProps","statusCls","statusStyle","background","badgeClassName","statusTextColor","visible","motionName","motionAppear","motionDeadline","_ref","motionClassName","isDot","scrollNumberCls","toString","scrollNumberStyle","show","key"],"sources":["/Users/poppie/Desktop/development/messenger/app/frontend/node_modules/antd/es/badge/index.js"],"sourcesContent":["var __rest = this && this.__rest || function (s, e) {\n  var t = {};\n  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n  if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n    if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n  }\n  return t;\n};\nimport classNames from 'classnames';\nimport CSSMotion from 'rc-motion';\nimport * as React from 'react';\nimport { useMemo, useRef } from 'react';\nimport { ConfigContext } from '../config-provider';\nimport { cloneElement } from '../_util/reactNode';\nimport Ribbon from './Ribbon';\nimport ScrollNumber from './ScrollNumber';\nimport useStyle from './style';\nimport { isPresetColor } from './utils';\nconst Badge = _a => {\n  var {\n      prefixCls: customizePrefixCls,\n      scrollNumberPrefixCls: customizeScrollNumberPrefixCls,\n      children,\n      status,\n      text,\n      color,\n      count = null,\n      overflowCount = 99,\n      dot = false,\n      size = 'default',\n      title,\n      offset,\n      style,\n      className,\n      showZero = false\n    } = _a,\n    restProps = __rest(_a, [\"prefixCls\", \"scrollNumberPrefixCls\", \"children\", \"status\", \"text\", \"color\", \"count\", \"overflowCount\", \"dot\", \"size\", \"title\", \"offset\", \"style\", \"className\", \"showZero\"]);\n  const {\n    getPrefixCls,\n    direction\n  } = React.useContext(ConfigContext);\n  const prefixCls = getPrefixCls('badge', customizePrefixCls);\n  // Style\n  const [wrapSSR, hashId] = useStyle(prefixCls);\n  // ================================ Misc ================================\n  const numberedDisplayCount = count > overflowCount ? `${overflowCount}+` : count;\n  const isZero = numberedDisplayCount === '0' || numberedDisplayCount === 0;\n  const ignoreCount = count === null || isZero && !showZero;\n  const hasStatus = (status !== null && status !== undefined || color !== null && color !== undefined) && ignoreCount;\n  const showAsDot = dot && !isZero;\n  const mergedCount = showAsDot ? '' : numberedDisplayCount;\n  const isHidden = useMemo(() => {\n    const isEmpty = mergedCount === null || mergedCount === undefined || mergedCount === '';\n    return (isEmpty || isZero && !showZero) && !showAsDot;\n  }, [mergedCount, isZero, showZero, showAsDot]);\n  // Count should be cache in case hidden change it\n  const countRef = useRef(count);\n  if (!isHidden) {\n    countRef.current = count;\n  }\n  const livingCount = countRef.current;\n  // We need cache count since remove motion should not change count display\n  const displayCountRef = useRef(mergedCount);\n  if (!isHidden) {\n    displayCountRef.current = mergedCount;\n  }\n  const displayCount = displayCountRef.current;\n  // We will cache the dot status to avoid shaking on leaved motion\n  const isDotRef = useRef(showAsDot);\n  if (!isHidden) {\n    isDotRef.current = showAsDot;\n  }\n  // =============================== Styles ===============================\n  const mergedStyle = useMemo(() => {\n    if (!offset) {\n      return Object.assign({}, style);\n    }\n    const offsetStyle = {\n      marginTop: offset[1]\n    };\n    if (direction === 'rtl') {\n      offsetStyle.left = parseInt(offset[0], 10);\n    } else {\n      offsetStyle.right = -parseInt(offset[0], 10);\n    }\n    return Object.assign(Object.assign({}, offsetStyle), style);\n  }, [direction, offset, style]);\n  // =============================== Render ===============================\n  // >>> Title\n  const titleNode = title !== null && title !== void 0 ? title : typeof livingCount === 'string' || typeof livingCount === 'number' ? livingCount : undefined;\n  // >>> Status Text\n  const statusTextNode = isHidden || !text ? null : /*#__PURE__*/React.createElement(\"span\", {\n    className: `${prefixCls}-status-text`\n  }, text);\n  // >>> Display Component\n  const displayNode = !livingCount || typeof livingCount !== 'object' ? undefined : cloneElement(livingCount, oriProps => ({\n    style: Object.assign(Object.assign({}, mergedStyle), oriProps.style)\n  }));\n  // Shared styles\n  const statusCls = classNames({\n    [`${prefixCls}-status-dot`]: hasStatus,\n    [`${prefixCls}-status-${status}`]: !!status,\n    [`${prefixCls}-status-${color}`]: isPresetColor(color)\n  });\n  const statusStyle = {};\n  if (color && !isPresetColor(color)) {\n    statusStyle.color = color;\n    statusStyle.background = color;\n  }\n  const badgeClassName = classNames(prefixCls, {\n    [`${prefixCls}-status`]: hasStatus,\n    [`${prefixCls}-not-a-wrapper`]: !children,\n    [`${prefixCls}-rtl`]: direction === 'rtl'\n  }, className);\n  // <Badge status=\"success\" />\n  if (!children && hasStatus) {\n    const statusTextColor = mergedStyle.color;\n    return wrapSSR( /*#__PURE__*/React.createElement(\"span\", Object.assign({}, restProps, {\n      className: classNames(badgeClassName, hashId),\n      style: mergedStyle\n    }), /*#__PURE__*/React.createElement(\"span\", {\n      className: statusCls,\n      style: statusStyle\n    }), text && /*#__PURE__*/React.createElement(\"span\", {\n      style: {\n        color: statusTextColor\n      },\n      className: `${prefixCls}-status-text`\n    }, text)));\n  }\n  // <Badge status=\"success\" count={<Icon type=\"xxx\" />}></Badge>\n  return wrapSSR( /*#__PURE__*/React.createElement(\"span\", Object.assign({}, restProps, {\n    className: classNames(badgeClassName, hashId)\n  }), children, /*#__PURE__*/React.createElement(CSSMotion, {\n    visible: !isHidden,\n    motionName: `${prefixCls}-zoom`,\n    motionAppear: false,\n    motionDeadline: 1000\n  }, _ref => {\n    let {\n      className: motionClassName\n    } = _ref;\n    const scrollNumberPrefixCls = getPrefixCls('scroll-number', customizeScrollNumberPrefixCls);\n    const isDot = isDotRef.current;\n    const scrollNumberCls = classNames({\n      [`${prefixCls}-dot`]: isDot,\n      [`${prefixCls}-count`]: !isDot,\n      [`${prefixCls}-count-sm`]: size === 'small',\n      [`${prefixCls}-multiple-words`]: !isDot && displayCount && displayCount.toString().length > 1,\n      [`${prefixCls}-status-${status}`]: !!status,\n      [`${prefixCls}-status-${color}`]: isPresetColor(color)\n    });\n    let scrollNumberStyle = Object.assign({}, mergedStyle);\n    if (color && !isPresetColor(color)) {\n      scrollNumberStyle = scrollNumberStyle || {};\n      scrollNumberStyle.background = color;\n    }\n    return /*#__PURE__*/React.createElement(ScrollNumber, {\n      prefixCls: scrollNumberPrefixCls,\n      show: !isHidden,\n      motionClassName: motionClassName,\n      className: scrollNumberCls,\n      count: displayCount,\n      title: titleNode,\n      style: scrollNumberStyle,\n      key: \"scrollNumber\"\n    }, displayNode);\n  }), statusTextNode));\n};\nBadge.Ribbon = Ribbon;\nexport default Badge;"],"mappings":";;AAAA,IAAIA,MAAM,GAAG,IAAI,IAAI,IAAI,CAACA,MAAM,IAAI,UAAUC,CAAC,EAAEC,CAAC,EAAE;EAClD,IAAIC,CAAC,GAAG,CAAC,CAAC;EACV,KAAK,IAAIC,CAAC,IAAIH,CAAC;IAAE,IAAII,MAAM,CAACC,SAAS,CAACC,cAAc,CAACC,IAAI,CAACP,CAAC,EAAEG,CAAC,CAAC,IAAIF,CAAC,CAACO,OAAO,CAACL,CAAC,CAAC,GAAG,CAAC,EAAED,CAAC,CAACC,CAAC,CAAC,GAAGH,CAAC,CAACG,CAAC,CAAC;EAAC;EACjG,IAAIH,CAAC,IAAI,IAAI,IAAI,OAAOI,MAAM,CAACK,qBAAqB,KAAK,UAAU,EAAE,KAAK,IAAIC,CAAC,GAAG,CAAC,EAAEP,CAAC,GAAGC,MAAM,CAACK,qBAAqB,CAACT,CAAC,CAAC,EAAEU,CAAC,GAAGP,CAAC,CAACQ,MAAM,EAAED,CAAC,EAAE,EAAE;IAC3I,IAAIT,CAAC,CAACO,OAAO,CAACL,CAAC,CAACO,CAAC,CAAC,CAAC,GAAG,CAAC,IAAIN,MAAM,CAACC,SAAS,CAACO,oBAAoB,CAACL,IAAI,CAACP,CAAC,EAAEG,CAAC,CAACO,CAAC,CAAC,CAAC,EAAER,CAAC,CAACC,CAAC,CAACO,CAAC,CAAC,CAAC,GAA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